package cn.com.zhangwoo.microstar.adapter;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import cn.com.microstar.activity.R;
import cn.com.zhangwoo.microstar.entity.CityUser;
import cn.com.zhangwoo.microstar.inteface.IUtilDB;
/***
 * 服饰百货ListView
 * @author Administrator
 *
 */
public class ClothingDepartmentStoreAdapter extends BaseAdapter {

	private List<CityUser .Data>  listDate;
	private Context context;
	private LayoutInflater inflater;
	
	public ClothingDepartmentStoreAdapter(Context context) {
		this.inflater=LayoutInflater.from(context);
		this.context=context;
	}
    @Override
    public int getCount() {
       return IUtilDB.CLOTHINGLISTVIEWTITLE.length;
    }

    @Override
    public Object getItem(int position) {
        return IUtilDB.CLOTHINGLISTVIEWTITLE[position];
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder = null;
        if (null == convertView) {
            convertView =inflater.inflate(R.layout.item_listview_clothingdepartmentstore, null);
            holder = new ViewHolder();
            holder.name = (TextView) convertView.findViewById(R.id.clothing_textview_item);
            holder.image1=(ImageView) convertView.findViewById(R.id.clothing_imageView1);
            holder.image2=(ImageView) convertView.findViewById(R.id.clothing_imageView2);
            holder.image3=(ImageView) convertView.findViewById(R.id.clothing_imageView3);
            holder.image4=(ImageView) convertView.findViewById(R.id.clothing_imageView4);
            holder.image5=(ImageView) convertView.findViewById(R.id.clothing_imageView5);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
        holder.name.setText(IUtilDB.CLOTHINGLISTVIEWTITLE[position]);
        return convertView;
    }
    
    class ViewHolder {
        ImageView image1,image2,image3,image4,image5;
        TextView name;
    }
}
